package com.majun.huaxishe.controller;


import com.majun.huaxishe.entity.Staff;
import com.majun.huaxishe.result.Result;
import com.majun.huaxishe.service.IStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 员工表 前端控制器
 * </p>
 *
 * @author 马骏
 * @since 2024-02-29
 */
@RestController
@RequestMapping("/staff")
@CrossOrigin
public class StaffController {

    @Autowired
    private IStaffService staffService;

    @PostMapping("/login")
    public Result login(@RequestBody Staff staff){
        staffService.login(staff);
        return Result.success();
    }
}
